#pragma once
#include <vector>
#include <BWAPI.h>
#include "defines.hpp"
#include "line.hpp"

#include "RangedSquad.hpp"
#include "MeleeSquad.hpp"

enum ArmyMode {defend, attack};
enum ArmyState {fight, stageForAttack, none};

class Army{
	BWAPI::Position m_initialPosition;
	RangedSquad m_rangedSquad;
	MeleeSquad m_meleeSquad;
	RangedSquad m_enemySquad;
	ArmyMode m_mode;
	ArmyState m_state;
	int m_updateInterval;
	int m_updateCounter;
	Line m_LOC;

	bool inRange();
	void tacticReavaluation();
	void draw() const;
	void displayEnemyRange() const;
public:
	Army();
	void addUnit(
		BWAPI::Unit *u
	);
	void removeUnit(
		BWAPI::Unit *u
	);
	void onFrame();
};